package com.zhongkun.datahome.service.service;

import com.zhongkun.datahome.service.domain.MiniProgramDataSetting;
import com.zhongkun.datahome.service.domain.MiniProgramVisionSetting;
import com.zhongkun.datahome.service.req.cmd.system.MiniProgramDataSettingCmd;
import com.zhongkun.datahome.service.req.cmd.system.MiniProgramNodeSettingCmd;
import com.zhongkun.datahome.service.req.cmd.system.MiniProgramVisionSettingCmd;
import com.zhongkun.datahome.service.res.setting.AppDataSettingVo;
import com.zhongkun.datahome.service.res.setting.AppVisionSettingVo;
import com.zhongkun.datahome.service.res.system.MiniProgramDataSettingVo;

import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Function;

/**
 * @Author: MinKun
 * @Date: Created in 2025/5/7
 * @Description:
 */
public interface ISystemSettingService {

    Boolean addMiniProgramDataSetting(MiniProgramDataSettingCmd cmd);

    Boolean updateMiniProgramDataSetting(MiniProgramDataSettingCmd cmd);

    boolean queryHasChildDataSetting(Long id);

    <T> void batchSetDataSettingName(List<T> list, Function<T, Long> getId, BiConsumer<T, String> setName);

    List<MiniProgramDataSettingVo> queryMiniProgramDataSettingList(Integer level);

    Boolean delMiniProgramDataSetting(Long id);

    Boolean queryMiniProgramDataSettingHasAssets(Long id);

    MiniProgramDataSetting queryById(Long id);

    List<MiniProgramVisionSetting> queryAllVisionSetting();

    void batchAddMiniProgramVisionSetting(List<MiniProgramVisionSettingCmd> cmd);

    Boolean addMiniProgramVisionSetting(MiniProgramVisionSettingCmd cmd);

    Boolean updateMiniProgramVisionSetting(MiniProgramVisionSettingCmd cmd);

    Boolean delMiniProgramVisionSetting(String code);

    List<AppVisionSettingVo> getMiniProgramVisionSettings();

    List<AppDataSettingVo> getMiniProgramDataSettings(Boolean employeeFlag);

    List<MiniProgramDataSettingVo> listCustomerDataSetting();

    Boolean addMiniProgramNodeSetting(MiniProgramNodeSettingCmd cmd);

    Boolean delMiniProgramNodeSetting(Long id);

    List<MiniProgramNodeSettingCmd> queryMiniProgramNodeSetting();

    void batchSaveMiniProgramNodeSetting(List<MiniProgramNodeSettingCmd> cmdList);

    List<Long> getDataSettingtIdsByRoleId(Long roleId);

    List<MiniProgramDataSetting> getDataSettingTree();
}
